/**
 * @file macros.h
 * @author your name (you@domain.com)
 * @brief 
 * @version 0.1
 * @date 2024-03-30
 * 
 * @copyright Copyright (c) 2024
 * 
 */
#ifndef JSASM_BASE_MACROS_H_
#define JSASM_BASE_MACROS_H_

#include <limits>
#include <type_traits>
#include "src/base/logging.h"

#define EXPAND(x) x

#define NOTHING(...)

#define CONCAT_(a, b) a##b

#define CONCAT(a, b) CONCAT_(a, b)

#define UNIQUE_IDENTIFIER(base) CONCAT(base, __COUNTER__)

#define OFFSET_OF(type, field) \
    (reinterpret_cast<intptr_t>(&(reinterpret_cast<type*>(16)->field)) - 16)

#endif // JSASM_BASE_MACROS_H_